package com.fz.us.oa.core.dao.com.impl;

import com.fz.us.admin.base.dao.impl.BaseDaoImpl;
import com.fz.us.admin.company.entity.User;
import com.fz.us.oa.core.dao.com.StartExamDao;
import com.fz.us.oa.core.entity.com.StartExam;
import org.springframework.stereotype.Repository;

/**
 * Created by dzw on 2017/12/14.
 */
@Repository
public class StartExamDaoImpl extends BaseDaoImpl<StartExam, String> implements StartExamDao {
    @Override
    public int delByModuleAndUser(String moduleName, User user) {
        return getSession().createQuery("DELETE FROM StartExam s WHERE s.moduleName=? AND s.user=?")
                .setParameter(0, moduleName)
                .setParameter(1, user)
                .executeUpdate();
    }
}
